apsdehal / apsdehal/Shortest-Adversarial-Path-Architecture

Type Error

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Once the player is timed out we are closing socket to that player, but after timeout if player sends data through socket following error occurs:
TypeError: Cannot read property 'write' of null at ConnectionHandler.notifyPlayerTwo (/connection-handler.js:99:21)
at GameManager.playerOneMove (game-manager.js:28:17)
at Socket. (connection-handler.js:60:30)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:543:20)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at connection-handler.js:99, where the TypeError is reported, and follow the call from game-manager.js:28 after a player times out. Reproduce the timeout, then send data through the closed socket; done means this sequence no longer raises the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.