StefanKopieczek / gossip

SIP stack in Golang
GNU Lesser General Public License v2.1
336 stars 109 forks source link

Fix for issue 13 (panic when connTable is stopped) #22

Closed StefanKopieczek closed 9 years ago

StefanKopieczek commented 9 years ago

Hey,

This PR makes the following changes:

It's not a huge review, but needs a bit of thought regarding the threading model, so don't feel you have to turn it around ASAP :)

Cheers :)

rynorris commented 9 years ago

Generally great work! :)

I'm a little sceptical that the channel-based model for synchronizing access to the conntable is the best. Thinking it might make more sense just to use a good old-fashioned mutex to avoid the overhead of extra allocations for response channels and message passing. Happy to leave it for now though and revisit if it becomes a perf bottleneck.

StefanKopieczek commented 9 years ago

Agree; I felt the channel idiom was a little stretched here; I felt that mutices would be an admission of defeat, but you're probably right. Let's revisit later though - I can't quite face rewriting it again right now!

StefanKopieczek commented 9 years ago

OK, pushed 4ef9e1f35009cbc83e8ea307d0c0df2d7bc8bc1a with markups. Please re-review and merge if happy.