Skip to content

Commit

Permalink
Fix stopshare event
Browse files Browse the repository at this point in the history
See #28
  • Loading branch information
jmattheis committed Oct 9, 2020
1 parent 53f0096 commit d228b19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/useRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export const useRoom = (): UseRoom => {
host.current = {};
stream.current?.getTracks().forEach((track) => track.stop());
stream.current = undefined;
conn.current?.send(JSON.stringify({type: 'stopshare'}));
conn.current?.send(JSON.stringify({type: 'stopshare', payload: {}}));
setState((current) => (current ? {...current, hostStream: undefined} : current));
};

Expand Down
2 changes: 1 addition & 1 deletion ws/readwrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func ReadTypedIncoming(r io.Reader) (Event, error) {
payload := create()

if err := json.Unmarshal(typed.Payload, payload); err != nil {
return nil, fmt.Errorf("kekw %s", err)
return nil, fmt.Errorf("incoming payload %s", err)
}
return payload, nil
}
Expand Down

0 comments on commit d228b19

Please sign in to comment.