Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
This closes apache#1271
  • Loading branch information
libinbin committed May 19, 2017
2 parents 1685bcd + e41e47c commit 2ff7105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/specs/thrift-compact-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ determine how to decode the field value.
Note that the field name is not encoded so field renames in the IDL do not affect forward and backward compatibility.

The default Java implementation (Apache Thrift 0.9.1) has undefined behavior when it tries to decode a field that has
another field-type then what is expected. Theoretically this could be detected at the cost of some additional checking.
another field-type than what is expected. Theoretically this could be detected at the cost of some additional checking.
Other implementation may perform this check and then either ignore the field, or return a protocol exception.

A *Union* is encoded exactly the same as a struct with the additional restriction that at most 1 field may be encoded.
Expand Down
4 changes: 2 additions & 2 deletions lib/go/thrift/simple_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ func (p *TSimpleServer) Stop() error {
}

func (p *TSimpleServer) processRequests(client TTransport) error {
defer p.Done()

processor := p.processorFactory.GetProcessor(client)
inputTransport := p.inputTransportFactory.GetTransport(client)
outputTransport := p.outputTransportFactory.GetTransport(client)
Expand All @@ -179,8 +181,6 @@ func (p *TSimpleServer) processRequests(client TTransport) error {
}
}()

defer p.Done()

if inputTransport != nil {
defer inputTransport.Close()
}
Expand Down

0 comments on commit 2ff7105

Please sign in to comment.