Replace QUIC with HTTP3/QUIC #43

Merged
nikooo777 merged 18 commits from http3 into master 2020-07-09 15:17:35 +02:00
Showing only changes of commit de1fb63a1c - Show all commits

View file

@ -29,12 +29,16 @@ func NewStore(opts StoreOpts) *Store {
// CloseStore closes the client that gets initialized when the store is initialized // CloseStore closes the client that gets initialized when the store is initialized
func (p *Store) CloseStore() error { func (p *Store) CloseStore() error {
if p.client != nil && p.client.stream != nil {
err := p.client.stream.Close() err := p.client.stream.Close()
if err != nil { if err != nil {
return errors.Err(err) return errors.Err(err)
} }
return p.client.Close() return p.client.Close()
} }
return nil
}
// Has asks the peer if they have a hash // Has asks the peer if they have a hash
func (p *Store) Has(hash string) (bool, error) { func (p *Store) Has(hash string) (bool, error) {